/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo.dominio;

import java.awt.*;
import javax.swing.JFrame;

/**
 *
 * @author Pablo
 */
public class Imprimir {

    Font fuente = new Font("Dialog", Font.PLAIN, 10);
    PrintJob pj;
    Graphics pg;

   
    

    public  Imprimir() {
        pj = Toolkit.getDefaultToolkit().getPrintJob(new JFrame(),"TICKET", null);
        
    }
    
    public void impresion(String cadena){
        pg=pj.getGraphics();
        pg.setFont(fuente);
        pg.setColor(Color.BLACK);
        pg.drawString(cadena, 60, 60);
        pg.dispose();
        pj.end();
    }
    
}
